﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web;
using System.Collections.Generic;

namespace eAssessment.Teststuff.CookieTestPart
{
    public partial class CookieTestPartUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            List<string> values = (List<string>)Session["testvalue"];
            if (values != null)
            {
                foreach (string s in values)
                {
                    cookieLabel.Text += s;
                }
            }
        }

        protected void createCookieButton_Click(object sender, EventArgs e)
        {
            List<string> values = new List<string>();
            values.Add(cookieTextbox.Text);
            values.Add("hello world!");
            Session["testvalue"] = values;
        }
    }
}
